__author__ = 'Jerry Liu'
import socket

HOST = 'chs.glodon.com'
PORT = 80
ADDR = (HOST, PORT)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(ADDR)
cmd="GET /index.jsp HTTP/1.0\r\n\r\n"
s.send(cmd.encode())
t = s.recv(4096).decode()
print(t)
file = open('d:\\index.html','w')
file.write(t)
file.close()
